package gs.wicket.app.shop;

import org.apache.wicket.AttributeModifier;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.model.Model;

import gs.wicket.app.account.Korisnik;
import gs.wicket.app.pages.Prodavnice;
import gs.wicket.app.product.ProductsPage;
import gs.wicket.app.session.GSSession;
import gs.wicket.app.login.*;

public class ShopingPage extends ProductsPage{
	public ShopingPage() {
		
		GSSession gsSession = (GSSession) getSession();
		Korisnik k = gsSession.getLogovanKorisnik();
		if (k==null){
			setResponsePage(LogInPage.class);
		}
	BookmarkablePageLink link1 = new BookmarkablePageLink("pice1", Pice.class);
	link1.add(new AttributeModifier("title", new Model(getLangProperty("pica.title"))));
	add(link1);
	
	BookmarkablePageLink link2 = new BookmarkablePageLink("satovi1", Satovi.class);
	link2.add(new AttributeModifier("title", new Model(getLangProperty("satovi.title"))));
	add(link2);
	
	BookmarkablePageLink link3 = new BookmarkablePageLink("parfemi1", Parfemi.class);
	link3.add(new AttributeModifier("title", new Model(getLangProperty("parfemi.title"))));
	add(link3);
	
	BookmarkablePageLink link4 = new BookmarkablePageLink("nakit1", Nakit.class);
	link4.add(new AttributeModifier("title", new Model(getLangProperty("nakit.title"))));
	add(link4);
	
	add(new Label("shopping.page.title", getLangProperty("shopping.page.title")));
	add(new Label("shopping.page.message1", getLangProperty("shopping.page.message1")));
	add(new Label("shopping.page.message2", getLangProperty("shopping.page.message2")));
	add(new Label("shopping.page.message3", getLangProperty("shopping.page.message3")));
	add(new Label("shopping.page.message4", getLangProperty("shopping.page.message4")));
}}
